package diagramobjects;
import java.awt.Graphics;

import program.PaintObjects;
import utils.Point;
import diagramobjects.Line;

public class TextLine extends Line
{
	protected Text Caption;

	
	
	public TextLine(Integer beginX, Integer beginY, Integer endX, Integer endY,
			Text caption)
	{
		super(beginX, beginY, endX, endY);
		Caption = caption;
	}
	
	

	public TextLine(Integer id, Point begin, Point end, Integer dashing,
			Text caption)
	{
		super(id, begin, end, dashing);
		Caption = caption;
	}


	public Text getCaption()
	{
		return Caption;
	}


	public void setCaption(Text caption)
	{
		Caption = caption;
	}



	/* (non-Javadoc)
	 * @see diagramobjects.Line#Draw(java.awt.Graphics, program.PaintObjects)
	 */
	@Override
	public void Draw(Graphics g, PaintObjects po)
	{
		po.DrawTextLine(g, this);
	}




	public void Print()
	{
		//TODO: POPRAWIC
		super.Print();
	}


	//TODO: poprawic
	
	public String ToDatabase()
	{
		return super.ToDatabase();
	}



	@Override
	public void MoveByVector(Integer vx, Integer vy)
	{
		// TODO Auto-generated method stub
		super.MoveByVector(vx, vy);
		Caption.MoveByVector(vx, vy);
	}
	
	
}
